package com.marquis.cloud.controller;

import com.marquis.cloud.entity.AutUser;
import com.marquis.cloud.service.AutUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired
    private AutUserService userService;

    /**
     * 根据用户名查询用户信息
     * @param userName
     * @return
     */
    @RequestMapping(value = "login")
    public AutUser login(String userName){
        return userService.findByUserName(userName);
    }
}
